//
//  WBComposeController.m
//  WeiboOC
//
//  Created by NIAN on 17/4/13.
//  Copyright © 2017年 NIAN. All rights reserved.
//

#import "WBComposeController.h"
#import "UIButton+CZAddition.h"
@interface WBComposeController ()

@end

@implementation WBComposeController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor redColor];
    [self setupUI];
}

-(void)setupUI{
    //1.添加返回按钮
    UIButton *cancelBtn = [UIButton cz_textButton:@"返回" fontSize:15 normalColor:[UIColor whiteColor] selectedColor:[UIColor whiteColor]];
    [cancelBtn setBackgroundImage:[UIImage imageNamed:@"new_feature_finish_button"] forState:UIControlStateNormal];
    [cancelBtn addTarget:self action:@selector(didClickBackBtn:) forControlEvents:UIControlEventTouchUpInside];
    cancelBtn.frame = CGRectMake(0, 0, 50, 30);
    UIBarButtonItem *left = [[UIBarButtonItem alloc] initWithCustomView:cancelBtn];
    self.navigationItem.leftBarButtonItem = left;
    
}

-(void)didClickBackBtn:(UIButton *)btn {
    //让当前控制器消失
    [self dismissViewControllerAnimated:YES completion:nil];
    

}


@end
